-
Notifications
You must be signed in to change notification settings - Fork 572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc(CMakeLists.txt): ENABLE_EXTERNAL_PLUGINS not compatible with Windows #968
base: master
Are you sure you want to change the base?
Conversation
How does it work? |
There is no libdl on Windows, and an error will occur when linking. |
我持懷疑態度。請多測試測試。 |
哦,我理解您说的问题,但该pr仅用于修复windows系统上的链接错误,并不涉及内存分配,至少可以让windows系统与linux、macos的功能一致。 |
開了這個選項,插件 DLL 基本上無法使用,比如現在常用那些插件,就完全沒信心不會造成崩潰。 那麼問題來了,既然無法工作,爲什麼要在 Windows 上打開這個 CMake 選項呢? |
我回退了修改,并且修改了CMakeLists.txt里的说明,以免其他人像我一样折腾半天。 |
其實你倒是提醒了我,如若動態加載插件的功能有非常大的需求,用家爲此可以接受安裝額外的系統組件,那麼動態鏈接微軟的 VC++ 運行時庫不失爲一個可行的技術方案。基本不需要 C++ 代碼的更動,但是要加一整套構建、發佈的流程,最後做成一個獨立的發行版。想必要投入的工夫也不會少,你如果有興趣可以繼續研究。 |
我会继续研究看看,不过我的想法是优化librime导出接口,避免直接导出C++类,这样也便于其他语言实现插件。 |
@lotem 已按你说的将整个项目改为 I20241231 22:27:24.870422 17604 plugins_module.cc:40] loading plugins from rime-plugins
I20241231 22:27:24.870551 17604 plugins_module.cc:49] loading plugin 'lua' from rime-plugins\rime-lua.dll
I20241231 22:27:24.880337 17604 registry.cc:14] registering component: lua_translator
I20241231 22:27:24.880345 17604 registry.cc:14] registering component: lua_filter
I20241231 22:27:24.880348 17604 registry.cc:14] registering component: lua_segmentor
I20241231 22:27:24.880350 17604 registry.cc:14] registering component: lua_processor
I20241231 22:27:24.880351 17604 plugins_module.cc:62] loaded plugin: lua
I20241231 22:27:24.880401 17604 plugins_module.cc:49] loading plugin 'octagram' from rime-plugins\rime-octagram.dll
I20241231 22:27:24.882263 17604 registry.cc:14] registering component: grammar
I20241231 22:27:24.882269 17604 plugins_module.cc:62] loaded plugin: octagram
I20241231 22:27:24.882320 17604 plugins_module.cc:49] loading plugin 'predict' from rime-plugins\rime-predict.dll
I20241231 22:27:24.884150 17604 registry.cc:14] registering component: predictor
I20241231 22:27:24.884157 17604 registry.cc:14] registering component: predict_translator
I20241231 22:27:24.884160 17604 plugins_module.cc:62] loaded plugin: predict |
Feature
fix Windows build when ENABLE_EXTERNAL_PLUGINS
Unit test
Manual test
Code Review
Additional Info